<template>
	<view
		:style="{
			backgroundColor: bg,
		}"
	>
		<view
			v-for="(item, index) in tableData"
			:key="index"
			class="flex justify-between font-14"
			:style="{
				borderBottom: '1px #e6e6e6 solid',
			}"
		>
			<view
				class="flex flex-1 justify-center align-center pad-5"
				:style="{
					borderRight: '1px #e6e6e6 solid',
					minHeight: '40px'
				}"
			>
				<text>{{ item[label] }}</text>
			</view>
			
			<view class="flex flex-3 mar-x-5 align-center color-999999" style="min-height: 40px;">
				<text>{{ item[value] }}</text>
			</view>
		</view>
	
		<!-- 页面加载 -->
		<u-loading-page :loading="loading" loadingText="加载中..." fontSize="16px"></u-loading-page>
	</view>
</template>

<script>
	export default {
		props: {
			// 背景色
			bg: {
				type: String,
				default: '#ffffff'
			},
			
			// 加载
			loading: {
				type: Boolean,
				default: false,
			},
			
			// 表格数据
			tableData: {
				type: Array,
				default: []
			},
			
			// 表头显示的字段
			label: {
				type: String,
				default: 'label'
			},
			
			// 表内容显示的字段
			value: {
				type: String,
				default: 'value'
			}
		},
		
		data() {
			return {
				
			}
		},
		
		methods: {
			
		}
	}
</script>

<style>
</style>